home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Demos / DE_MesaAR1 / Examples / AddIn / MesaAddIn.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-30  |  2.5 KB  |  83 lines

  1. /**************************************************************************
  2.  *                                                                        *
  3.  *                                                                        *
  4.  *          This code is copyright (c) 1992                               *
  5.  *                     Athena Design, Inc.                                *
  6.  *                     and David Pollak                                   *
  7.  *                                                                        *
  8.  *                ALL RIGHTS RESERVED                                     *
  9.  *                                                                        *
  10.  *                                                                        *
  11.  *                                                                        *
  12.  *                                                                        *
  13.  *                                                                        *
  14.  **************************************************************************/
  15.  
  16. /**************************************************************************
  17.  
  18.     This header file defines the data structures and functions needed to
  19.     impliment a function add-in.
  20.  
  21.  **************************************************************************/
  22.  
  23. #import "MesaError.h"
  24. #import "objc/Object.h"
  25.  
  26. typedef enum {numberAddInValue = 0,stringAddInValue,addressAddInValue,
  27.     rangeAddInValue,errorAddInValue} AddInValueType;
  28.  
  29. typedef struct _AddInValue {
  30.     int type;
  31.     union {
  32.         char *string;
  33.         double number;
  34.         int error;
  35.         struct {
  36.             short row1,col1,row2,col2;
  37.             void *cells;
  38.             } ad;
  39.         } values;
  40.     } AddInValue;
  41.  
  42. /*
  43.  
  44.     These functions allow you to push and pop items from the stack
  45.  
  46. */
  47.  
  48. int numberOfItemsOnStack(void *);
  49. void popValueFromStack(void *,AddInValue *);
  50. void pushNumberOnStack(void *,double);
  51. void pushStringOnStack(void *,const char *);
  52. void pushErrorOnStack(void *,int);
  53. void pushAddressOnStack(void *,short,short,void *);
  54. void pushRangeOnStack(void *,short,short,short,short,void *);
  55.  
  56.  
  57. /*
  58.     These functions allow you to manipulate values
  59. */
  60.  
  61. void initAddInValue(AddInValue *);
  62. void freeAddInValue(AddInValue *);
  63. double getAddInValueNumber(AddInValue *,int *);
  64. void getAddInValue(AddInValue *,AddInValue *,int *);
  65.  
  66. /*
  67.  
  68.     This function allows you to get the value for a cell
  69.  
  70. */
  71.  
  72. int getValueForCell(void *,short,short,int *,AddInValue *);
  73.  
  74. @interface MesaAddIn:Object
  75. {
  76. }
  77.  
  78. + (char *)name;
  79. - execute:(void *)stack numberOfParams:(int)num sheet:(void *)sh;
  80. - beginRecalc;
  81. - endRecalc;
  82. @end
  83.